package org.cmisarium.xcmis.fsprovider.tck;

import org.cmisarium.xcmis.fsprovider.StorageProviderImpl;
import org.xcmis.spi.CmisRegistry;
import org.xcmis.spi.CmisRegistryFactory;

import java.io.IOException;

public class RegistryFactoryImpl implements CmisRegistryFactory
{

   private static CmisRegistry reg;

   public CmisRegistry getRegistry()
   {
      if (reg != null)
         return reg;

      reg = new CmisRegistry();
      try
      {
         reg.addStorage(new StorageProviderImpl("target", "cmis1", "testName"));
      }
      catch (IOException e)
      {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }

      return reg;
   }

}
